package org.nf.web.common.converter;

import org.nf.web.common.TypeConverter;

/**
 * @Author lzp
 * @Date 2024-05-07
 */
public class FloatConverter implements TypeConverter {

    @Override
    public boolean supports(Class<?> type) {
        return type.equals(Float.class) || type.equals(Float.TYPE);
    }

    @Override
    public Object convert(String requestParam) {
        return Float.valueOf(requestParam);
    }

}
